package com.ruoyi.owner.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.owner.domain.FzBuildingOwnerRoomRel;
import com.ruoyi.owner.mapper.FzBuildingOwnerRoomRelMapper;
import com.ruoyi.owner.service.IFzBuildingOwnerRoomRelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.core.text.Convert;

/**
 * 业主成员Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-03-09
 */
@Service
public class FzBuildingOwnerRoomRelServiceImpl implements IFzBuildingOwnerRoomRelService
{
    @Autowired
    private FzBuildingOwnerRoomRelMapper fzBuildingOwnerRoomRelMapper;

    /**
     * 查询业主成员
     * 
     * @param ownerId 业主成员ID
     * @return 业主成员
     */
    @Override
    public FzBuildingOwnerRoomRel selectFzBuildingOwnerRoomRelById(String ownerId)
    {
        return fzBuildingOwnerRoomRelMapper.selectFzBuildingOwnerRoomRelById(ownerId);
    }

    /**
     * 查询业主成员列表
     * 
     * @param fzBuildingOwnerRoomRel 业主成员
     * @return 业主成员
     */
    @Override
    public List<FzBuildingOwnerRoomRel> selectFzBuildingOwnerRoomRelList(FzBuildingOwnerRoomRel fzBuildingOwnerRoomRel)
    {
        return fzBuildingOwnerRoomRelMapper.selectFzBuildingOwnerRoomRelList(fzBuildingOwnerRoomRel);
    }

    /**
     * 新增业主成员
     * 
     * @param fzBuildingOwnerRoomRel 业主成员
     * @return 结果
     */
    @Override
    public int insertFzBuildingOwnerRoomRel(FzBuildingOwnerRoomRel fzBuildingOwnerRoomRel)
    {
        fzBuildingOwnerRoomRel.setCreateTime(DateUtils.getNowDate());
        return fzBuildingOwnerRoomRelMapper.insertFzBuildingOwnerRoomRel(fzBuildingOwnerRoomRel);
    }

    /**
     * 修改业主成员
     * 
     * @param fzBuildingOwnerRoomRel 业主成员
     * @return 结果
     */
    @Override
    public int updateFzBuildingOwnerRoomRel(FzBuildingOwnerRoomRel fzBuildingOwnerRoomRel)
    {
        fzBuildingOwnerRoomRel.setUpdateTime(DateUtils.getNowDate());
        return fzBuildingOwnerRoomRelMapper.updateFzBuildingOwnerRoomRel(fzBuildingOwnerRoomRel);
    }

    /**
     * 删除业主成员对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteFzBuildingOwnerRoomRelByIds(String ids)
    {
        return fzBuildingOwnerRoomRelMapper.deleteFzBuildingOwnerRoomRelByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除业主成员信息
     * 
     * @param ownerId 业主成员ID
     * @return 结果
     */
    @Override
    public int deleteFzBuildingOwnerRoomRelById(String ownerId)
    {
        return fzBuildingOwnerRoomRelMapper.deleteFzBuildingOwnerRoomRelById(ownerId);
    }
}
